function color(){
  let result = "#"
  for (let index = 0; index < 6; index++) {
     result += rand(0,15).toString(16)
  }
  return result
}

function rand(n,m){
  return n + parseInt(Math.random() * (m-n+1))
}


function knock(node1,node2){
  const l1 = node1.offsetLeft
  const r1 = node1.offsetLeft + node1.offsetWidth
  const t1 = node1.offsetTop
  const b1 = node1.offsetTop + node1.offsetHeight

  const l2 = node2.offsetLeft
  const r2 = node2.offsetLeft + node2.offsetWidth
  const t2 = node2.offsetTop
  const b2 = node2.offsetTop + node2.offsetHeight

  if(l2 > r1 || r2 < l1 || t2 > b1 || b2 < t1){
    return false
  }else {
    return true
  }
}